package com.diaohw.module.metadata.obj.convert;

import com.diaohw.module.metadata.obj.dto.DictionaryItemDTO;
import com.diaohw.module.metadata.obj.entity.DictionaryItemDO;
import com.diaohw.module.metadata.obj.vo.DictionaryItemVO;
import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * <p>
 * 数据字典项信息表 类型转换
 * </p>
 *
 * @author D-Hw
 * @since 2024-09-20
 */
@Mapper
public interface DictionaryItemConvert {

    DictionaryItemConvert INSTANCE = Mappers.getMapper(DictionaryItemConvert.class);

    /**
     * dto to entity
     */
    @InheritConfiguration
    DictionaryItemDO dtoToEntity(DictionaryItemDTO dto);

    /**
     * entity to dto
     */
    @InheritConfiguration
    DictionaryItemDTO entityToDto(DictionaryItemDO entity);

    /**
     * entity to dto
     */
    @InheritConfiguration
    DictionaryItemVO entityToVo(DictionaryItemDO entity);

    /**
     * entity to dto
     */
    @InheritConfiguration
    List<DictionaryItemVO> entityToVo(List<DictionaryItemDO> list);


}

